package com.meisupic.copyright.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.meisupic.copyright.common.MonitorStatusEnum;
import com.meisupic.copyright.util.DictionaryUtil;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @Author lanjian
 * @Date 2018/3/14 上午10:17
 */

@Data
public class MonitorRecordVo implements Serializable {

  private Long id;

  private Long worksId;

  private String worksName;

  private String worksType;

  private String worksTypeName;

  private String workImgUrl;

  private MonitorStatusEnum status;

  private String statusName;

  private Integer version;

  private Long userId;

  private String userName;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
  private Date createTime;

  private Date modifyTime;

  public String getWorksTypeName() {
    return DictionaryUtil.getDicNameByValue(this.getWorksType(), "worktype");
  }


  public String getStatusName() {
    return status.getDesc();
  }
}
